append() and extend() methods ?? Prakash nidhi Verma183820-Jul-2018pythonpython Updated on 15-Sep-2020
Prakash nidhi Verma
20-Jul-2018Differentiate between append() and extend() methods:
Both append() and extend() methods are the methods of list. These methods are used to add the elements at the end of the list.
*) append(element) – adds the given element at the end of the list which has called this method.
*) extend(another-list) – adds the elements of another-list at the end of the list which is called the extend method.